package lco.serializer;

import com.google.inject.Inject;
import com.google.inject.Provider;
import lco.cRLanguage.Add;
import lco.cRLanguage.Assignment;
import lco.cRLanguage.AssignmentRightHand;
import lco.cRLanguage.CRLanguagePackage;
import lco.cRLanguage.CalcCR;
import lco.cRLanguage.CalcMean;
import lco.cRLanguage.Callable;
import lco.cRLanguage.Declaration;
import lco.cRLanguage.Delete;
import lco.cRLanguage.File;
import lco.cRLanguage.FindSimilar;
import lco.cRLanguage.For;
import lco.cRLanguage.ForAll;
import lco.cRLanguage.ForFile;
import lco.cRLanguage.ForJava;
import lco.cRLanguage.ForWhile;
import lco.cRLanguage.HighestCR;
import lco.cRLanguage.IndexedVariable;
import lco.cRLanguage.IndexedVectorial;
import lco.cRLanguage.IntegerExpression;
import lco.cRLanguage.Method;
import lco.cRLanguage.NumericFunctionExpression;
import lco.cRLanguage.Print;
import lco.cRLanguage.Program;
import lco.cRLanguage.ScalarAssign;
import lco.cRLanguage.ScalarDeclaration;
import lco.cRLanguage.ScalarVariable;
import lco.cRLanguage.Size;
import lco.cRLanguage.Statement;
import lco.cRLanguage.StringValue;
import lco.cRLanguage.VectorialAssign;
import lco.cRLanguage.VectorialDeclaration;
import lco.cRLanguage.VectorialVariable;
import lco.services.CRLanguageGrammarAccess;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.xtext.serializer.acceptor.ISemanticSequenceAcceptor;
import org.eclipse.xtext.serializer.acceptor.SequenceFeeder;
import org.eclipse.xtext.serializer.diagnostic.ISemanticSequencerDiagnosticProvider;
import org.eclipse.xtext.serializer.diagnostic.ISerializationDiagnostic.Acceptor;
import org.eclipse.xtext.serializer.sequencer.AbstractSemanticSequencer;
import org.eclipse.xtext.serializer.sequencer.GenericSequencer;
import org.eclipse.xtext.serializer.sequencer.ISemanticNodeProvider.INodesForEObjectProvider;
import org.eclipse.xtext.serializer.sequencer.ISemanticSequencer;
import org.eclipse.xtext.serializer.sequencer.ITransientValueService;
import org.eclipse.xtext.serializer.sequencer.ITransientValueService.ValueTransient;

@SuppressWarnings("restriction")
public class AbstractCRLanguageSemanticSequencer extends AbstractSemanticSequencer {

	@Inject
	protected CRLanguageGrammarAccess grammarAccess;
	
	@Inject
	protected ISemanticSequencerDiagnosticProvider diagnosticProvider;
	
	@Inject
	protected ITransientValueService transientValues;
	
	@Inject
	@GenericSequencer
	protected Provider<ISemanticSequencer> genericSequencerProvider;
	
	protected ISemanticSequencer genericSequencer;
	
	
	@Override
	public void init(ISemanticSequencer sequencer, ISemanticSequenceAcceptor sequenceAcceptor, Acceptor errorAcceptor) {
		super.init(sequencer, sequenceAcceptor, errorAcceptor);
		this.genericSequencer = genericSequencerProvider.get();
		this.genericSequencer.init(sequencer, sequenceAcceptor, errorAcceptor);
	}
	
	public void createSequence(EObject context, EObject semanticObject) {
		if(semanticObject.eClass().getEPackage() == CRLanguagePackage.eINSTANCE) switch(semanticObject.eClass().getClassifierID()) {
			case CRLanguagePackage.ADD:
				if(context == grammarAccess.getAddRule()) {
					sequence_Add(context, (Add) semanticObject); 
					return; 
				}
				else break;
			case CRLanguagePackage.ASSIGNMENT:
				if(context == grammarAccess.getAssignmentRule()) {
					sequence_Assignment(context, (Assignment) semanticObject); 
					return; 
				}
				else break;
			case CRLanguagePackage.ASSIGNMENT_RIGHT_HAND:
				if(context == grammarAccess.getAssignmentRightHandRule()) {
					sequence_AssignmentRightHand(context, (AssignmentRightHand) semanticObject); 
					return; 
				}
				else break;
			case CRLanguagePackage.CALC_CR:
				if(context == grammarAccess.getCalcCRRule()) {
					sequence_CalcCR(context, (CalcCR) semanticObject); 
					return; 
				}
				else break;
			case CRLanguagePackage.CALC_MEAN:
				if(context == grammarAccess.getCalcMeanRule()) {
					sequence_CalcMean(context, (CalcMean) semanticObject); 
					return; 
				}
				else break;
			case CRLanguagePackage.CALLABLE:
				if(context == grammarAccess.getCallableRule()) {
					sequence_Callable(context, (Callable) semanticObject); 
					return; 
				}
				else break;
			case CRLanguagePackage.DECLARATION:
				if(context == grammarAccess.getDeclarationRule()) {
					sequence_Declaration(context, (Declaration) semanticObject); 
					return; 
				}
				else break;
			case CRLanguagePackage.DELETE:
				if(context == grammarAccess.getDeleteRule()) {
					sequence_Delete(context, (Delete) semanticObject); 
					return; 
				}
				else break;
			case CRLanguagePackage.FILE:
				if(context == grammarAccess.getFileRule()) {
					sequence_File(context, (File) semanticObject); 
					return; 
				}
				else break;
			case CRLanguagePackage.FIND_SIMILAR:
				if(context == grammarAccess.getFindSimilarRule()) {
					sequence_FindSimilar(context, (FindSimilar) semanticObject); 
					return; 
				}
				else break;
			case CRLanguagePackage.FOR:
				if(context == grammarAccess.getForRule()) {
					sequence_For(context, (For) semanticObject); 
					return; 
				}
				else break;
			case CRLanguagePackage.FOR_ALL:
				if(context == grammarAccess.getForAllRule()) {
					sequence_ForAll(context, (ForAll) semanticObject); 
					return; 
				}
				else break;
			case CRLanguagePackage.FOR_FILE:
				if(context == grammarAccess.getForFileRule()) {
					sequence_ForFile(context, (ForFile) semanticObject); 
					return; 
				}
				else break;
			case CRLanguagePackage.FOR_JAVA:
				if(context == grammarAccess.getForJavaRule()) {
					sequence_ForJava(context, (ForJava) semanticObject); 
					return; 
				}
				else break;
			case CRLanguagePackage.FOR_WHILE:
				if(context == grammarAccess.getForWhileRule()) {
					sequence_ForWhile(context, (ForWhile) semanticObject); 
					return; 
				}
				else break;
			case CRLanguagePackage.HIGHEST_CR:
				if(context == grammarAccess.getHighestCRRule()) {
					sequence_HighestCR(context, (HighestCR) semanticObject); 
					return; 
				}
				else break;
			case CRLanguagePackage.INDEXED_VARIABLE:
				if(context == grammarAccess.getIndexedVariableRule()) {
					sequence_IndexedVariable(context, (IndexedVariable) semanticObject); 
					return; 
				}
				else break;
			case CRLanguagePackage.INDEXED_VECTORIAL:
				if(context == grammarAccess.getIndexedVectorialRule()) {
					sequence_IndexedVectorial(context, (IndexedVectorial) semanticObject); 
					return; 
				}
				else break;
			case CRLanguagePackage.INTEGER_EXPRESSION:
				if(context == grammarAccess.getIntegerExpressionRule()) {
					sequence_IntegerExpression(context, (IntegerExpression) semanticObject); 
					return; 
				}
				else break;
			case CRLanguagePackage.METHOD:
				if(context == grammarAccess.getMethodRule()) {
					sequence_Method(context, (Method) semanticObject); 
					return; 
				}
				else break;
			case CRLanguagePackage.NUMERIC_FUNCTION_EXPRESSION:
				if(context == grammarAccess.getNumericFunctionExpressionRule()) {
					sequence_NumericFunctionExpression(context, (NumericFunctionExpression) semanticObject); 
					return; 
				}
				else break;
			case CRLanguagePackage.PRINT:
				if(context == grammarAccess.getPrintRule()) {
					sequence_Print(context, (Print) semanticObject); 
					return; 
				}
				else break;
			case CRLanguagePackage.PROGRAM:
				if(context == grammarAccess.getProgramRule()) {
					sequence_Program(context, (Program) semanticObject); 
					return; 
				}
				else break;
			case CRLanguagePackage.SCALAR_ASSIGN:
				if(context == grammarAccess.getScalarAssignRule()) {
					sequence_ScalarAssign(context, (ScalarAssign) semanticObject); 
					return; 
				}
				else break;
			case CRLanguagePackage.SCALAR_DECLARATION:
				if(context == grammarAccess.getScalarDeclarationRule()) {
					sequence_ScalarDeclaration(context, (ScalarDeclaration) semanticObject); 
					return; 
				}
				else break;
			case CRLanguagePackage.SCALAR_VARIABLE:
				if(context == grammarAccess.getScalarVariableRule() ||
				   context == grammarAccess.getVariableRule()) {
					sequence_ScalarVariable(context, (ScalarVariable) semanticObject); 
					return; 
				}
				else break;
			case CRLanguagePackage.SIZE:
				if(context == grammarAccess.getSizeRule()) {
					sequence_Size(context, (Size) semanticObject); 
					return; 
				}
				else break;
			case CRLanguagePackage.STATEMENT:
				if(context == grammarAccess.getStatementRule()) {
					sequence_Statement(context, (Statement) semanticObject); 
					return; 
				}
				else break;
			case CRLanguagePackage.STRING_VALUE:
				if(context == grammarAccess.getStringValueRule()) {
					sequence_StringValue(context, (StringValue) semanticObject); 
					return; 
				}
				else break;
			case CRLanguagePackage.VECTORIAL_ASSIGN:
				if(context == grammarAccess.getVectorialAssignRule()) {
					sequence_VectorialAssign(context, (VectorialAssign) semanticObject); 
					return; 
				}
				else break;
			case CRLanguagePackage.VECTORIAL_DECLARATION:
				if(context == grammarAccess.getVectorialDeclarationRule()) {
					sequence_VectorialDeclaration(context, (VectorialDeclaration) semanticObject); 
					return; 
				}
				else break;
			case CRLanguagePackage.VECTORIAL_VARIABLE:
				if(context == grammarAccess.getVariableRule() ||
				   context == grammarAccess.getVectorialVariableRule()) {
					sequence_VectorialVariable(context, (VectorialVariable) semanticObject); 
					return; 
				}
				else break;
			}
		if (errorAcceptor != null) errorAcceptor.accept(diagnosticProvider.createInvalidContextOrTypeDiagnostic(semanticObject, context));
	}
	
	/**
	 * Constraint:
	 *     (variable=IndexedVariable args+=NumericFunctionExpression args+=NumericFunctionExpression*)
	 *
	 * Features:
	 *    variable[1, 1]
	 *    args[1, *]
	 */
	protected void sequence_Add(EObject context, Add semanticObject) {
		genericSequencer.createSequence(context, semanticObject);
	}
	
	
	/**
	 * Constraint:
	 *     (
	 *         integer=INT | 
	 *         double=FLOAT | 
	 *         file=File | 
	 *         variable=[Variable|ID] | 
	 *         indexedVectorial=IndexedVectorial | 
	 *         callable=Callable
	 *     )
	 *
	 * Features:
	 *    integer[0, 1]
	 *         EXCLUDE_IF_SET double
	 *         EXCLUDE_IF_SET file
	 *         EXCLUDE_IF_SET variable
	 *         EXCLUDE_IF_SET indexedVectorial
	 *         EXCLUDE_IF_SET callable
	 *    double[0, 1]
	 *         EXCLUDE_IF_SET integer
	 *         EXCLUDE_IF_SET file
	 *         EXCLUDE_IF_SET variable
	 *         EXCLUDE_IF_SET indexedVectorial
	 *         EXCLUDE_IF_SET callable
	 *    file[0, 1]
	 *         EXCLUDE_IF_SET integer
	 *         EXCLUDE_IF_SET double
	 *         EXCLUDE_IF_SET variable
	 *         EXCLUDE_IF_SET indexedVectorial
	 *         EXCLUDE_IF_SET callable
	 *    variable[0, 1]
	 *         EXCLUDE_IF_SET integer
	 *         EXCLUDE_IF_SET double
	 *         EXCLUDE_IF_SET file
	 *         EXCLUDE_IF_SET indexedVectorial
	 *         EXCLUDE_IF_SET callable
	 *    indexedVectorial[0, 1]
	 *         EXCLUDE_IF_SET integer
	 *         EXCLUDE_IF_SET double
	 *         EXCLUDE_IF_SET file
	 *         EXCLUDE_IF_SET variable
	 *         EXCLUDE_IF_SET callable
	 *    callable[0, 1]
	 *         EXCLUDE_IF_SET integer
	 *         EXCLUDE_IF_SET double
	 *         EXCLUDE_IF_SET file
	 *         EXCLUDE_IF_SET variable
	 *         EXCLUDE_IF_SET indexedVectorial
	 */
	protected void sequence_AssignmentRightHand(EObject context, AssignmentRightHand semanticObject) {
		genericSequencer.createSequence(context, semanticObject);
	}
	
	
	/**
	 * Constraint:
	 *     (sa=ScalarAssign | va=VectorialAssign)
	 *
	 * Features:
	 *    sa[0, 1]
	 *         EXCLUDE_IF_SET va
	 *    va[0, 1]
	 *         EXCLUDE_IF_SET sa
	 */
	protected void sequence_Assignment(EObject context, Assignment semanticObject) {
		genericSequencer.createSequence(context, semanticObject);
	}
	
	
	/**
	 * Constraint:
	 *     (arg1=IndexedVariable arg2=IndexedVariable?)
	 *
	 * Features:
	 *    arg1[1, 1]
	 *    arg2[0, 1]
	 */
	protected void sequence_CalcCR(EObject context, CalcCR semanticObject) {
		genericSequencer.createSequence(context, semanticObject);
	}
	
	
	/**
	 * Constraint:
	 *     arg=IndexedVariable
	 *
	 * Features:
	 *    arg[1, 1]
	 */
	protected void sequence_CalcMean(EObject context, CalcMean semanticObject) {
		if(errorAcceptor != null) {
			if(transientValues.isValueTransient(semanticObject, CRLanguagePackage.Literals.CALC_MEAN__ARG) == ValueTransient.YES)
				errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, CRLanguagePackage.Literals.CALC_MEAN__ARG));
		}
		INodesForEObjectProvider nodes = createNodeProvider(semanticObject);
		SequenceFeeder feeder = createSequencerFeeder(semanticObject, nodes);
		feeder.accept(grammarAccess.getCalcMeanAccess().getArgIndexedVariableParserRuleCall_2_0(), semanticObject.getArg());
		feeder.finish();
	}
	
	
	/**
	 * Constraint:
	 *     (cr=CalcCR | mean=CalcMean | highest=HighestCR | similar=FindSimilar | method=Method)
	 *
	 * Features:
	 *    cr[0, 1]
	 *         EXCLUDE_IF_SET mean
	 *         EXCLUDE_IF_SET highest
	 *         EXCLUDE_IF_SET similar
	 *         EXCLUDE_IF_SET method
	 *    mean[0, 1]
	 *         EXCLUDE_IF_SET cr
	 *         EXCLUDE_IF_SET highest
	 *         EXCLUDE_IF_SET similar
	 *         EXCLUDE_IF_SET method
	 *    highest[0, 1]
	 *         EXCLUDE_IF_SET cr
	 *         EXCLUDE_IF_SET mean
	 *         EXCLUDE_IF_SET similar
	 *         EXCLUDE_IF_SET method
	 *    similar[0, 1]
	 *         EXCLUDE_IF_SET cr
	 *         EXCLUDE_IF_SET mean
	 *         EXCLUDE_IF_SET highest
	 *         EXCLUDE_IF_SET method
	 *    method[0, 1]
	 *         EXCLUDE_IF_SET cr
	 *         EXCLUDE_IF_SET mean
	 *         EXCLUDE_IF_SET highest
	 *         EXCLUDE_IF_SET similar
	 */
	protected void sequence_Callable(EObject context, Callable semanticObject) {
		genericSequencer.createSequence(context, semanticObject);
	}
	
	
	/**
	 * Constraint:
	 *     (sd=ScalarDeclaration | vd=VectorialDeclaration)
	 *
	 * Features:
	 *    sd[0, 1]
	 *         EXCLUDE_IF_SET vd
	 *    vd[0, 1]
	 *         EXCLUDE_IF_SET sd
	 */
	protected void sequence_Declaration(EObject context, Declaration semanticObject) {
		genericSequencer.createSequence(context, semanticObject);
	}
	
	
	/**
	 * Constraint:
	 *     (
	 *         variable=IndexedVariable 
	 *         (
	 *             function=Callable | 
	 *             (delx+=NumericFunctionExpression dely+=NumericFunctionExpression? (delx+=NumericFunctionExpression dely+=NumericFunctionExpression?)*)
	 *         )
	 *     )
	 *
	 * Features:
	 *    variable[1, 1]
	 *    function[0, 1]
	 *         EXCLUDE_IF_SET delx
	 *         EXCLUDE_IF_SET dely
	 *         EXCLUDE_IF_SET delx
	 *         EXCLUDE_IF_SET dely
	 *    delx[0, *]
	 *         EXCLUDE_IF_SET function
	 *    dely[0, *]
	 *         EXCLUDE_IF_UNSET delx
	 *         EXCLUDE_IF_SET function
	 */
	protected void sequence_Delete(EObject context, Delete semanticObject) {
		genericSequencer.createSequence(context, semanticObject);
	}
	
	
	/**
	 * Constraint:
	 *     file=STRING
	 *
	 * Features:
	 *    file[1, 1]
	 */
	protected void sequence_File(EObject context, File semanticObject) {
		if(errorAcceptor != null) {
			if(transientValues.isValueTransient(semanticObject, CRLanguagePackage.Literals.FILE__FILE) == ValueTransient.YES)
				errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, CRLanguagePackage.Literals.FILE__FILE));
		}
		INodesForEObjectProvider nodes = createNodeProvider(semanticObject);
		SequenceFeeder feeder = createSequencerFeeder(semanticObject, nodes);
		feeder.accept(grammarAccess.getFileAccess().getFileSTRINGTerminalRuleCall_0(), semanticObject.getFile());
		feeder.finish();
	}
	
	
	/**
	 * Constraint:
	 *     (arg1=IndexedVariable arg2=NumericFunctionExpression arg3=NumericFunctionExpression)
	 *
	 * Features:
	 *    arg1[1, 1]
	 *    arg2[1, 1]
	 *    arg3[1, 1]
	 */
	protected void sequence_FindSimilar(EObject context, FindSimilar semanticObject) {
		if(errorAcceptor != null) {
			if(transientValues.isValueTransient(semanticObject, CRLanguagePackage.Literals.FIND_SIMILAR__ARG1) == ValueTransient.YES)
				errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, CRLanguagePackage.Literals.FIND_SIMILAR__ARG1));
			if(transientValues.isValueTransient(semanticObject, CRLanguagePackage.Literals.FIND_SIMILAR__ARG2) == ValueTransient.YES)
				errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, CRLanguagePackage.Literals.FIND_SIMILAR__ARG2));
			if(transientValues.isValueTransient(semanticObject, CRLanguagePackage.Literals.FIND_SIMILAR__ARG3) == ValueTransient.YES)
				errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, CRLanguagePackage.Literals.FIND_SIMILAR__ARG3));
		}
		INodesForEObjectProvider nodes = createNodeProvider(semanticObject);
		SequenceFeeder feeder = createSequencerFeeder(semanticObject, nodes);
		feeder.accept(grammarAccess.getFindSimilarAccess().getArg1IndexedVariableParserRuleCall_2_0(), semanticObject.getArg1());
		feeder.accept(grammarAccess.getFindSimilarAccess().getArg2NumericFunctionExpressionParserRuleCall_4_0(), semanticObject.getArg2());
		feeder.accept(grammarAccess.getFindSimilarAccess().getArg3NumericFunctionExpressionParserRuleCall_6_0(), semanticObject.getArg3());
		feeder.finish();
	}
	
	
	/**
	 * Constraint:
	 *     (variable=[ScalarVariable|ID] start=NumericFunctionExpression end=NumericFunctionExpression statements+=Statement*)
	 *
	 * Features:
	 *    variable[1, 1]
	 *    start[1, 1]
	 *    end[1, 1]
	 *    statements[0, *]
	 */
	protected void sequence_ForAll(EObject context, ForAll semanticObject) {
		genericSequencer.createSequence(context, semanticObject);
	}
	
	
	/**
	 * Constraint:
	 *     (name=ScalarVariable path=STRING statements+=Statement*)
	 *
	 * Features:
	 *    name[1, 1]
	 *    path[1, 1]
	 *    statements[0, *]
	 */
	protected void sequence_ForFile(EObject context, ForFile semanticObject) {
		genericSequencer.createSequence(context, semanticObject);
	}
	
	
	/**
	 * Constraint:
	 *     (
	 *         initialization=[Variable|ID] 
	 *         assignment=AssignmentRightHand 
	 *         condition=[Variable|ID] 
	 *         (
	 *             comparison='==' | 
	 *             comparison='<' | 
	 *             comparison='>' | 
	 *             comparison='<=' | 
	 *             comparison='>=' | 
	 *             comparison='!='
	 *         ) 
	 *         expression=NumericFunctionExpression 
	 *         variable=[Variable|ID] 
	 *         (operation='+=' | operation='-=') 
	 *         step=INT 
	 *         statements+=Statement*
	 *     )
	 *
	 * Features:
	 *    initialization[1, 1]
	 *    assignment[1, 1]
	 *    condition[1, 1]
	 *    comparison[0, 6]
	 *    expression[1, 1]
	 *    variable[1, 1]
	 *    operation[0, 2]
	 *    step[1, 1]
	 *    statements[0, *]
	 */
	protected void sequence_ForJava(EObject context, ForJava semanticObject) {
		genericSequencer.createSequence(context, semanticObject);
	}
	
	
	/**
	 * Constraint:
	 *     (variable=[VectorialVariable|ID] statements+=Statement*)
	 *
	 * Features:
	 *    variable[1, 1]
	 *    statements[0, *]
	 */
	protected void sequence_ForWhile(EObject context, ForWhile semanticObject) {
		genericSequencer.createSequence(context, semanticObject);
	}
	
	
	/**
	 * Constraint:
	 *     (java=ForJava | all=ForAll | forWhile=ForWhile | file=ForFile)
	 *
	 * Features:
	 *    java[0, 1]
	 *         EXCLUDE_IF_SET all
	 *         EXCLUDE_IF_SET forWhile
	 *         EXCLUDE_IF_SET file
	 *    all[0, 1]
	 *         EXCLUDE_IF_SET java
	 *         EXCLUDE_IF_SET forWhile
	 *         EXCLUDE_IF_SET file
	 *    forWhile[0, 1]
	 *         EXCLUDE_IF_SET java
	 *         EXCLUDE_IF_SET all
	 *         EXCLUDE_IF_SET file
	 *    file[0, 1]
	 *         EXCLUDE_IF_SET java
	 *         EXCLUDE_IF_SET all
	 *         EXCLUDE_IF_SET forWhile
	 */
	protected void sequence_For(EObject context, For semanticObject) {
		genericSequencer.createSequence(context, semanticObject);
	}
	
	
	/**
	 * Constraint:
	 *     arg=IndexedVariable
	 *
	 * Features:
	 *    arg[1, 1]
	 */
	protected void sequence_HighestCR(EObject context, HighestCR semanticObject) {
		if(errorAcceptor != null) {
			if(transientValues.isValueTransient(semanticObject, CRLanguagePackage.Literals.HIGHEST_CR__ARG) == ValueTransient.YES)
				errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, CRLanguagePackage.Literals.HIGHEST_CR__ARG));
		}
		INodesForEObjectProvider nodes = createNodeProvider(semanticObject);
		SequenceFeeder feeder = createSequencerFeeder(semanticObject, nodes);
		feeder.accept(grammarAccess.getHighestCRAccess().getArgIndexedVariableParserRuleCall_2_0(), semanticObject.getArg());
		feeder.finish();
	}
	
	
	/**
	 * Constraint:
	 *     (variable=[Variable|ID] (x=IntegerExpression y=IntegerExpression?)?)
	 *
	 * Features:
	 *    variable[1, 1]
	 *    x[0, 1]
	 *         MANDATORY_IF_SET y
	 *    y[0, 1]
	 *         EXCLUDE_IF_UNSET x
	 */
	protected void sequence_IndexedVariable(EObject context, IndexedVariable semanticObject) {
		genericSequencer.createSequence(context, semanticObject);
	}
	
	
	/**
	 * Constraint:
	 *     (variable=[VectorialVariable|ID] x=IntegerExpression y=IntegerExpression?)
	 *
	 * Features:
	 *    variable[1, 1]
	 *    x[1, 1]
	 *    y[0, 1]
	 */
	protected void sequence_IndexedVectorial(EObject context, IndexedVectorial semanticObject) {
		genericSequencer.createSequence(context, semanticObject);
	}
	
	
	/**
	 * Constraint:
	 *     (int=INT | variable=[Variable|ID])
	 *
	 * Features:
	 *    int[0, 1]
	 *         EXCLUDE_IF_SET variable
	 *    variable[0, 1]
	 *         EXCLUDE_IF_SET int
	 */
	protected void sequence_IntegerExpression(EObject context, IntegerExpression semanticObject) {
		genericSequencer.createSequence(context, semanticObject);
	}
	
	
	/**
	 * Constraint:
	 *     (size=Size | add=Add | delete=Delete)
	 *
	 * Features:
	 *    size[0, 1]
	 *         EXCLUDE_IF_SET add
	 *         EXCLUDE_IF_SET delete
	 *    add[0, 1]
	 *         EXCLUDE_IF_SET size
	 *         EXCLUDE_IF_SET delete
	 *    delete[0, 1]
	 *         EXCLUDE_IF_SET size
	 *         EXCLUDE_IF_SET add
	 */
	protected void sequence_Method(EObject context, Method semanticObject) {
		genericSequencer.createSequence(context, semanticObject);
	}
	
	
	/**
	 * Constraint:
	 *     (int=INT | double=FLOAT | indexedVariable=IndexedVariable | callable=Callable)
	 *
	 * Features:
	 *    int[0, 1]
	 *         EXCLUDE_IF_SET double
	 *         EXCLUDE_IF_SET indexedVariable
	 *         EXCLUDE_IF_SET callable
	 *    double[0, 1]
	 *         EXCLUDE_IF_SET int
	 *         EXCLUDE_IF_SET indexedVariable
	 *         EXCLUDE_IF_SET callable
	 *    indexedVariable[0, 1]
	 *         EXCLUDE_IF_SET int
	 *         EXCLUDE_IF_SET double
	 *         EXCLUDE_IF_SET callable
	 *    callable[0, 1]
	 *         EXCLUDE_IF_SET int
	 *         EXCLUDE_IF_SET double
	 *         EXCLUDE_IF_SET indexedVariable
	 */
	protected void sequence_NumericFunctionExpression(EObject context, NumericFunctionExpression semanticObject) {
		genericSequencer.createSequence(context, semanticObject);
	}
	
	
	/**
	 * Constraint:
	 *     (args+=StringValue args+=StringValue*)
	 *
	 * Features:
	 *    args[1, *]
	 */
	protected void sequence_Print(EObject context, Print semanticObject) {
		genericSequencer.createSequence(context, semanticObject);
	}
	
	
	/**
	 * Constraint:
	 *     (declarations+=Declaration* statements+=Statement*)
	 *
	 * Features:
	 *    declarations[0, *]
	 *    statements[0, *]
	 */
	protected void sequence_Program(EObject context, Program semanticObject) {
		genericSequencer.createSequence(context, semanticObject);
	}
	
	
	/**
	 * Constraint:
	 *     (var=[Variable|ID] expr=AssignmentRightHand)
	 *
	 * Features:
	 *    var[1, 1]
	 *    expr[1, 1]
	 */
	protected void sequence_ScalarAssign(EObject context, ScalarAssign semanticObject) {
		if(errorAcceptor != null) {
			if(transientValues.isValueTransient(semanticObject, CRLanguagePackage.Literals.SCALAR_ASSIGN__VAR) == ValueTransient.YES)
				errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, CRLanguagePackage.Literals.SCALAR_ASSIGN__VAR));
			if(transientValues.isValueTransient(semanticObject, CRLanguagePackage.Literals.SCALAR_ASSIGN__EXPR) == ValueTransient.YES)
				errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, CRLanguagePackage.Literals.SCALAR_ASSIGN__EXPR));
		}
		INodesForEObjectProvider nodes = createNodeProvider(semanticObject);
		SequenceFeeder feeder = createSequencerFeeder(semanticObject, nodes);
		feeder.accept(grammarAccess.getScalarAssignAccess().getVarVariableIDTerminalRuleCall_0_0_1(), semanticObject.getVar());
		feeder.accept(grammarAccess.getScalarAssignAccess().getExprAssignmentRightHandParserRuleCall_2_0(), semanticObject.getExpr());
		feeder.finish();
	}
	
	
	/**
	 * Constraint:
	 *     (type=Type variable=ScalarVariable expr=AssignmentRightHand?)
	 *
	 * Features:
	 *    type[1, 1]
	 *    variable[1, 1]
	 *    expr[0, 1]
	 */
	protected void sequence_ScalarDeclaration(EObject context, ScalarDeclaration semanticObject) {
		genericSequencer.createSequence(context, semanticObject);
	}
	
	
	/**
	 * Constraint:
	 *     name=ID
	 *
	 * Features:
	 *    name[1, 1]
	 */
	protected void sequence_ScalarVariable(EObject context, ScalarVariable semanticObject) {
		if(errorAcceptor != null) {
			if(transientValues.isValueTransient(semanticObject, CRLanguagePackage.Literals.VARIABLE__NAME) == ValueTransient.YES)
				errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, CRLanguagePackage.Literals.VARIABLE__NAME));
		}
		INodesForEObjectProvider nodes = createNodeProvider(semanticObject);
		SequenceFeeder feeder = createSequencerFeeder(semanticObject, nodes);
		feeder.accept(grammarAccess.getScalarVariableAccess().getNameIDTerminalRuleCall_0(), semanticObject.getName());
		feeder.finish();
	}
	
	
	/**
	 * Constraint:
	 *     variable=IndexedVariable
	 *
	 * Features:
	 *    variable[1, 1]
	 */
	protected void sequence_Size(EObject context, Size semanticObject) {
		if(errorAcceptor != null) {
			if(transientValues.isValueTransient(semanticObject, CRLanguagePackage.Literals.SIZE__VARIABLE) == ValueTransient.YES)
				errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, CRLanguagePackage.Literals.SIZE__VARIABLE));
		}
		INodesForEObjectProvider nodes = createNodeProvider(semanticObject);
		SequenceFeeder feeder = createSequencerFeeder(semanticObject, nodes);
		feeder.accept(grammarAccess.getSizeAccess().getVariableIndexedVariableParserRuleCall_0_0(), semanticObject.getVariable());
		feeder.finish();
	}
	
	
	/**
	 * Constraint:
	 *     (a=Assignment | c=Callable | p=Print | f=For)
	 *
	 * Features:
	 *    a[0, 1]
	 *         EXCLUDE_IF_SET c
	 *         EXCLUDE_IF_SET p
	 *         EXCLUDE_IF_SET f
	 *    c[0, 1]
	 *         EXCLUDE_IF_SET a
	 *         EXCLUDE_IF_SET p
	 *         EXCLUDE_IF_SET f
	 *    p[0, 1]
	 *         EXCLUDE_IF_SET a
	 *         EXCLUDE_IF_SET c
	 *         EXCLUDE_IF_SET f
	 *    f[0, 1]
	 *         EXCLUDE_IF_SET a
	 *         EXCLUDE_IF_SET c
	 *         EXCLUDE_IF_SET p
	 */
	protected void sequence_Statement(EObject context, Statement semanticObject) {
		genericSequencer.createSequence(context, semanticObject);
	}
	
	
	/**
	 * Constraint:
	 *     (stringArg=STRING | variableArg=NumericFunctionExpression)
	 *
	 * Features:
	 *    stringArg[0, 1]
	 *         EXCLUDE_IF_SET variableArg
	 *    variableArg[0, 1]
	 *         EXCLUDE_IF_SET stringArg
	 */
	protected void sequence_StringValue(EObject context, StringValue semanticObject) {
		genericSequencer.createSequence(context, semanticObject);
	}
	
	
	/**
	 * Constraint:
	 *     (var=IndexedVectorial expr=AssignmentRightHand)
	 *
	 * Features:
	 *    var[1, 1]
	 *    expr[1, 1]
	 */
	protected void sequence_VectorialAssign(EObject context, VectorialAssign semanticObject) {
		if(errorAcceptor != null) {
			if(transientValues.isValueTransient(semanticObject, CRLanguagePackage.Literals.VECTORIAL_ASSIGN__VAR) == ValueTransient.YES)
				errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, CRLanguagePackage.Literals.VECTORIAL_ASSIGN__VAR));
			if(transientValues.isValueTransient(semanticObject, CRLanguagePackage.Literals.VECTORIAL_ASSIGN__EXPR) == ValueTransient.YES)
				errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, CRLanguagePackage.Literals.VECTORIAL_ASSIGN__EXPR));
		}
		INodesForEObjectProvider nodes = createNodeProvider(semanticObject);
		SequenceFeeder feeder = createSequencerFeeder(semanticObject, nodes);
		feeder.accept(grammarAccess.getVectorialAssignAccess().getVarIndexedVectorialParserRuleCall_0_0(), semanticObject.getVar());
		feeder.accept(grammarAccess.getVectorialAssignAccess().getExprAssignmentRightHandParserRuleCall_2_0(), semanticObject.getExpr());
		feeder.finish();
	}
	
	
	/**
	 * Constraint:
	 *     (x=INT y=INT? type=Type variable=VectorialVariable)
	 *
	 * Features:
	 *    x[1, 1]
	 *    y[0, 1]
	 *    type[1, 1]
	 *    variable[1, 1]
	 */
	protected void sequence_VectorialDeclaration(EObject context, VectorialDeclaration semanticObject) {
		genericSequencer.createSequence(context, semanticObject);
	}
	
	
	/**
	 * Constraint:
	 *     name=ID
	 *
	 * Features:
	 *    name[1, 1]
	 */
	protected void sequence_VectorialVariable(EObject context, VectorialVariable semanticObject) {
		if(errorAcceptor != null) {
			if(transientValues.isValueTransient(semanticObject, CRLanguagePackage.Literals.VARIABLE__NAME) == ValueTransient.YES)
				errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, CRLanguagePackage.Literals.VARIABLE__NAME));
		}
		INodesForEObjectProvider nodes = createNodeProvider(semanticObject);
		SequenceFeeder feeder = createSequencerFeeder(semanticObject, nodes);
		feeder.accept(grammarAccess.getVectorialVariableAccess().getNameIDTerminalRuleCall_0(), semanticObject.getName());
		feeder.finish();
	}
}
